Methods and systems for managing power supply at a device

ABSTRACT

The present invention discloses methods and systems for managing power supply at a device. The device is capable of receiving power via a plurality of power inputs. The device first determines whether or not a first condition is satisfied. A first switch is maintained in a closed position if the first condition is satisfied. When the first switch is in a closed position, the device is capable of receiving power from a first power supply. Alternatively, when the first condition is not satisfied, the device determines whether or not a second condition is satisfied. If the second condition is satisfied, the first switch is maintained to be in a closed position. If the second condition is not satisfied, the first switch is opened after a predefined time period.

TECHNICAL FIELD

The present invention relates in general to the field of power supplymanagement in electronic devices. More particularly, the presentinvention relates to methods and systems for managing power supply at adevice which is capable of receiving power via a plurality of powerinputs while avoiding draining too much power from a battery.

BACKGROUND ART

It has been common to power electronic devices such as MP3 players,mobile phones, CD players, etc., from power sources in an automobilethrough cigarette lighter receptacles. Electronic devices operating onhigher voltages may be powered directly from the main battery of theautomobile. When an electronic device draws power directly from the mainbattery, it may continue drawing power even when the automobile is notrunning, i.e., when there is no ignition. This could be a problem andcause the main battery to be drained quickly as it is only dischargingand not charging.

DISCLOSURE OF INVENTION Summary of Invention

The present invention discloses methods and systems for managing powersupply at a device which is capable of receiving power via a pluralityof power inputs. The device first determines whether or not a firstcondition is satisfied. When the first condition is satisfied, a firstswitch is maintained to be in a closed position. The device is capableof receiving power from a first power supply when the first switch is ina closed position. If the first condition is not satisfied, the devicedetermines whether or not a second condition is satisfied. If the secondcondition is satisfied, the first switch is maintained in the closedposition. If the second condition is not satisfied, the first switch isopened after a predefined time period, and the device becomes unable toreceive power from the first power supply. The device may perform ashut-down process before opening the first switch. The predefined timeis set by a user and/or administrator.

According to one of the embodiments of the present invention, the secondcondition is satisfied if the device is receiving power from a secondpower supply.

According to one of the embodiments of the present invention, the deviceis connected to the first power supply through a terminal block of thedevice. The terminal block is mounted on the device. The device isconnected to the second power supply through a power connector of thedevice. The power connector is selected from a group consisting of: aUniversal Serial Bus (USB) input port, a Direct Current (DC) input port,and an Alternating Current (AC) input port.

According to one of the embodiments of the present invention, the devicesends a first message to a user and/or administrator of the device whenthe device stops receiving power from the second power supply. If aconfirmation is received from the user and/or administrator, the firstswitch is opened after a predefined time period. If a confirmation isnot received from the user and/or administrator, the first switch ismaintained in the closed position.

According to one of the embodiments of the present invention, when thedevice is placed in an automobile, the first switch is closed whenignition is on, and the first switch is opened after a predefined timeperiod when the ignition is off. The first power supply may be a mainbattery of the automobile, and the second power supply may be acigarette lighter receptacle.

According to one of the embodiments of the present invention, when thedevice is placed in an automobile, the second condition is satisfied ifan accessory (ACC) line of the automobile is in an on state.

According to one of the embodiments of the present invention, the firstswitch is comprised of a latch and two field-effect transistors.

DETAILED DESCRIPTION

The ensuing description provides preferred exemplary embodiments) only,and is not intended to limit the scope, applicability or configurationof the invention. Rather, the ensuing description of the preferredexemplary embodiments) will provide those skilled in the art with anenabling description for implementing a preferred exemplary embodimentof the invention. It being understood that various changes may be madein the function and arrangement of elements without departing from thespirit and scope of the invention as set forth in the appended claims.

Specific details are given in the following description to provide athorough understanding of the embodiments. However, it will beunderstood by one of ordinary skill in the art that the embodiments maybe practiced without these specific details. For example, circuits maybe shown in block diagrams in order not to obscure the embodiments inunnecessary detail. In other instances, well-known circuits, processes,algorithms, structures, and techniques may be shown without unnecessarydetail in order to avoid obscuring the embodiments.

Also, it is noted that the embodiments may be described as a processwhich is depicted as a flowchart, a flow diagram, a data flow diagram, astructure diagram, or a block diagram. Although a flowchart may describethe operations as a sequential process, many of the operations can beperformed in parallel or concurrently. In addition, the order of theoperations may be rearranged. A process is terminated when itsoperations are completed, but could have additional steps not includedin the figure. A process may correspond to a method, a function, aprocedure, a subroutine, a subprogram, etc. When a process correspondsto a function, its termination corresponds to a return of the functionto the calling function or the main function.

Embodiments, or portions thereof, may be embodied in programinstructions operable upon a processing unit for performing functionsand operations as described herein. The program instructions making upthe various embodiments may be stored in a storage medium.

The program instructions making up the various embodiments may be storedin a storage medium. Moreover, as disclosed herein, the term “storagemedium” may represent one or more devices for storing data, includingread only memory (ROM), programmable read-only memory (PROM), erasableprogrammable read-only memory (EPROM), random access memory (RAM),magnetic RAM, core memory, floppy disk, flexible disk, hard disk,magnetic tape, CD-ROM, flash memory devices, a memory card and/or othermachine readable mediums for storing information. The term“machine-readable medium” includes, but is not limited to portable orfixed storage devices, optical storage mediums, magnetic mediums, memorychips or cartridges, wireless channels and various other mediums capableof storing, containing or carrying instruction(s) and/or data. Amachine-readable medium can be realized by virtualization, and can be avirtual machine readable medium including a virtual machine readablemedium in a cloud-based instance.

The term storage medium or computer-readable medium, as used hereinrefers to any medium that participates in providing instructions to aprocessing unit for execution. The computer-readable medium is just oneexample of a machine-readable medium, which may carry instructions forimplementing any of the methods and/or techniques described herein. Sucha medium may take many forms, including but not limited to, non-volatilemedia, volatile media, and transmission media. Non-volatile mediaincludes, for example, optical or magnetic disks. Volatile mediaincludes dynamic memory. Transmission media includes coaxial cables,copper wire and fiber optics. Transmission media can also take the formof acoustic or light waves, such as those generated during radio-waveand infrared data communications.

A volatile storage may be used for storing temporary variables or otherintermediate information during execution of instructions by aprocessing unit. A non-volatile storage or static storage may be usedfor storing static information and instructions for processor, as wellas various system configuration parameters.

The storage medium may include a number of software modules that may beimplemented as software code to be executed by the processing unit usingany suitable computer instruction type. The software code may be storedas a series of instructions or commands, or as a program in the storagemedium.

Various forms of computer readable media may be involved in carrying oneor more sequences of one or more instructions to the processor forexecution. For example, the instructions may initially be carried on amagnetic disk from a remote computer. Alternatively, a remote computercan load the instructions into its dynamic memory and send theinstructions to the system that runs the one or more sequences of one ormore instructions.

A processing unit may be a microprocessor, a microcontroller, a digitalsignal processor (DSP), any combination of those devices, or any othercircuitry configured to process information.

A processing unit executes program instructions or code segments forimplementing embodiments of the present invention. Furthermore,embodiments may be implemented by hardware, software, firmware,middleware, microcode, hardware description languages, or anycombination thereof. When implemented in software, firmware, middlewareor microcode, the program instructions to perform the necessary tasksmay be stored in a computer readable storage medium. A processingunit(s) can be realized by virtualization, and can be a virtualprocessing unit(s) including a virtual processing unit in a cloud-basedinstance.

Embodiments of the present invention are related to the use of acomputer system for implementing the techniques described herein. In anembodiment, the inventive processing units may reside on a machine suchas a computer platform. According to one embodiment of the invention,the techniques described herein are performed by computer system inresponse to the processing unit executing one or more sequences of oneor more instructions contained in the volatile memory. Such instructionsmay be read into the volatile memory from another computer-readablemedium. Execution of the sequences of instructions contained in thevolatile memory causes the processing unit to perform the process stepsdescribe alternative embodiments, hard-wired circuitry may be used inplace of or in combination with software instructions to implement theinvention. Thus, embodiments of the invention are not limited to anyspecific combination of hardware circuitry and software.

A code segment, such as program instructions, may represent a procedure,a function, a subprogram, a program, a routine, a subroutine, a module,a software package, a class, or any combination of instructions, datastructures, or program statements. A code segment may be coupled toanother code segment or a hardware circuit by passing and/or receivingof hardware circuitry and software.

A network interface that may be provided by a node is an Ethernetinterface, a frame relay interface, a fibre optic interface, a cableinterface, a DSL interface, a token ring interface, a serial businterface, a universal serial bus (USB) interface, Firewire interface,Peripheral Component Interconnect (PCI) interface, etc.

A network interface may be implemented by a standalone electroniccomponent or may be integrated with other electronic components. Anetwork interface may have no network connection or at least one networkconnection depending on the configuration. A network interface may be anEthernet interface, a frame relay interface, a fibre optic interface, acable interface, a Digital Subscriber Line (DSL) interface, a token ringinterface, a serial bus interface, a universal serial bus (USB)interface, Firewire interface, Peripheral Component Interconnect (PCI)interface, cellular network interface, etc.

A network interface may connect to a wired or wireless access network.An access network may carry one or more network protocol data. A wiredaccess network may be implemented using Ethernet, fiber optic, cable,DSL, frame relay, token ring, serial bus, USB, Firewire, PCI, or anymaterial that can pass information. An wireless access network may beimplemented using infra-red, High-Speed Packet Access (HSPA), HSPA+,Long Term Evolution (LTE), WiMax, General packet radio service (GPRS),Global System for Mobile Communications (GSM), Enhanced Data rates forGSM Evolution (EDGE), Code division multiple access (CDMA), WiFi,CDMA2000, Wideband CDMA (WCDMA), Time Division CDMA (TD-SCDMA),BLUETOOTH, WiBRO, Evolution-Data Optimized (EV-DO); Digital EnhancedCordless Telecommunications (DECT); Digital AMPS (IS-136/TDMA);Integrated Digital Enhanced (iDEN) or any other wireless technologies.For example, a network interface may be used as a local area network(LAN) interface or a wide area network (WAN) interface.

Embodiments, or portions thereof, may be embodied in a computer datasignal, which may be in any suitable form for communication over atransmission medium such that it is readable for execution by afunctional device (e.g., processing unit) for performing the operationsdescribed herein. The computer data signal may include any binarydigital electronic signal that can propagate over a transmission mediumsuch as electronic network channels, optical fibers, air,electromagnetic media, radio frequency (RF) links, and the like, andthus the data signal may be in the form of an electrical signal, opticalsignal, radio frequency or other wireless communication signal, etc. Thecode segments may, in certain embodiments, be downloaded via computernetworks such as the Internet, an intranet, LAN, metropolitan areanetwork (MAN), wide area network (WAN), the public switched telephonenetwork (PSTN), a satellite communication system, a cable transmissionsystem, and/or the like.

The present invention discloses embodiments where an electronic devicecan be directly charged from a main battery, but when a condition issatisfied, the device shuts down after a predefined time period.

FIG. 1A is a block diagram of a device, such as device 100, according tovarious embodiments of the present invention. Device 100 comprisesterminal block 106 and power connector 107 to receive power from firstpower supply 104 and second power supply 105 respectively. Device 100also comprises load 103 and switch 102. Switch 102 can be a part of apower management circuit. In a preferred embodiment, first power supply104 is capable of supplying power to load 103 when switch 102 is in aclosed position. Second power supply 105 is capable of supplyingadequate power to load 103, which may be lower than the power suppliedby first power supply 104.

Device 100 has dual power supply capabilities. When there is aninterruption in power received via one of the power supplies, device 100can seamlessly start receiving power from the other power supply,provided that both the power supplies are connected to device 100. Itshould be appreciated that the present invention is not limited todevice 100 being capable of receiving power from two power supplies,such that device 100 may receive power through one or more powersupplies through one or more power connectors respectively.

Device 100 may further comprise at least one processing unit, at leastone storage medium, and a system bus connecting the components of device100. In one variant, device 100 may also comprise one or more networkinterfaces through which device 100 may connect to a network, acting asa network host, network node, or etc.

In an exemplary embodiment, second power supply 105 is connected to load103 through a voltage converter, where second power supply 105 may be acigarette lighter receptacle of a car. First power supply 104 may be themain battery of the car, and there may be fluctuations in the powerreceived from first power supply 104 occasionally. When the ignition ofthe car is turned on, power through first power supply 104 may fluctuateinitially. Then load 103 may draw power from second power supply 105.Power may be received from second power supply 105 through the voltageconverter in order to convert the voltage of the power supplied bysecond power supply 105, as the voltage may be unstable or may exceedthe expected range for load 103. Ignition is said to be on when theignition switch is in an on position, i.e. the engine of the vehicle ison.

FIG. 1B is a block diagram of device 100, according to one of theembodiments of the present invention. The difference between FIG. 1A andFIG. 1B is that in FIG. 1B, device 100 has power management circuit 110and input 111 through which device 100 connects to an accessory line(ACC line). Power management circuit 110 may comprise switch 102. Input111, power connector 107 and terminal block 106 is connected to powermanagement circuit 110. Power management circuit 110 may comprise aprocessing unit for carrying out processes illustrated in the flowchartsof the present invention. Power management circuit 110 manages powerreceived from the power supplies, such that power from only one of thefirst power supply 104 and second power supply 105 is supplied to load103. The processing unit may control switch 102 according toconfigurations of device 100.

The processing unit may use information received through input 111 inorder to determine whether switch 102 should be in a closed position orin an open position. In one variant, input 111 is an ACC input that maybe connected to an ACC line of an automobile. In another variant, input111 is connected to a dual in-line package (DIP) switch through which auser can manually control switch 102. The user may switch the DIP switchon or off by pressing a button mounted on device 100. Alternatively, theDIP switch can be turned on or off by using a toggle switch mounted ondevice 100. Alternatively, input 111 may be any input which can be usedby a processing unit of device 100 to determine whether switch 102should be in a closed position or an open position.

A power connector can be a DC input port, AC input port, a UniversalSerial Bus (USB) input port, or any other type of input port throughwhich device 100 can receive power from second power supply 105.

Load 103 may include an active electronic circuit which consumes power.Load 110 may include one or more discrete components, chips, and/orelectronic systems.

An ACC line is supplied with power or the voltage is set to a non-zerovalue when the ignition switch is in an on position, i.e. engine of avehicle is on. In some scenarios the ACC line might also be suppliedwith power when the ignition switch is in a position for supplying powerto devices used in the vehicle while the engine is not on. For purposesof this invention, the ACC line is only supplied with power when theengine is on.

In one of the embodiments, a user and/or administrator can configuredevice 100 through a web interface, an application programming interface(API), a command line interface or a console. Alternatively, device 100may comprise a user interface through which the user may configuredevice 100. The configuration may then be stored in a local storage unitof device 100 as a configuration file or as a register or memory value.

FIG. 6 is an illustrative block diagram of power management circuit 110.Power circuit 601, diode 602, switch 603, voltage converter 604, voltagedivider 605 and voltage divider 606 are comprised in power managementcircuit 110. Processing unit 607 may be comprised in load 103. Switch603 may be the same as switch 102 of FIG. 1A. Power from first powersupply 104 and second power supply 105 is received at power circuit 601.Processing unit 607 receives signals from power circuit 601 throughvoltage dividers 605 and 606. Voltage dividers 605 and 606 are used forsending signals corresponding to first power supply 104 and second powersupply 606 respectively, to processing unit 607. Processing unit 607determines whether power is being received from second power supply 105in order to control switch 603. For example, depending on whether or notpower is received from second power supply 105, processing unit 607allows switch 603 to be in a closed position or an open position. Inanother example, processing unit 607 allows switch 603 to be in a closedposition or an open position based on a signal received through input111. When processing unit 607 sends a signal to keep switch 603 in aclosed position, power from first power supply 104 may be allowed topass through switch 603 to voltage converter 604. Voltage converter 604is used to convert the voltage of the power supplied by first powersupply 104, as the power supplied by first power supply 104 may beunstable or may exceed or may be lower than the expected range for load103. Voltage converter 604 may perform functions includingraising/lowering voltage supplied by first power supply 104 andprotecting load 103. When processing unit 607 sends a signal to keepswitch 603 in an open position, load 103 no longer receives power fromfirst power supply 104.

In one variant, the voltage converter may be in an external device,rather than in device 100. The voltage of power received from firstpower supply 105 and/or from second power supply 104 may be first beconverted, i.e. raised or lowered, by a voltage converter in theexternal device. The power is therefore supplied to device 100 throughthe voltage converter in the external device.

Switch 102 may be a transistor such as field-effect transistors (FET),bipolar transistors, bipolar junction transistor (BJT) insulated-gatebipolar transistor (IGBT), metal-oxide-semiconductor FET (MOSFET), metalsemiconductor FET (MESFET), junction FET (JFET), carbon nanotube FET(CNTFET), high-electron-mobility transistor (HEMT), heterostructureinsulated gate FET (HIGFET), modulation-doped FET (MODFET), nanoparticleorganic memory FET (NOMFET), organic FET (OFET), vertical-slit FET(VeSFET), tunnel FET (TFET), relay, or any other type of switches thatcan support more than 3.3V passing through itself, and can be controlledby a processing circuit.

Terminal block 106 is used for receiving power from first power supply104. Terminal block 106 may be mounted on device 100.

FIG. 2A is a flowchart illustrating how a device, such as device 100,draws power from available power supplies according to one of theembodiments of the present invention. FIG. 2A is viewed in conjunctionwith FIG. 1 for better understanding of the embodiment.

For example, device 100 is being used in an automobile, such as a car,where the main battery acts as first power supply 104 and the powerthrough a cigarette lighter receptacle acts as second power supply 105.Although the cigarette lighter receptacle draws power from the mainbattery, it may be regarded as second power supply 105 according to thepresent invention. One of the reasons is that power provided by thecigarette lighter receptacle is usually less than the power receiveddirectly from the main battery. In some models of cars, the cigarettelighter receptacle cannot supply power when the ignition is off.

The process starts at step 200 where device 100 is connected to both offirst power supply 104 through terminal block 106 and second powersupply 105 through power connector 107, or one of first power supply 104or second power supply 105. In step 201, device 100 determines whether afirst condition is satisfied. Switch 102 is closed in step 202 if thefirst condition is satisfied and device 100 is able to receive powerfrom first power supply 104. If the first condition is not satisfied,device 100 determines whether a second condition is satisfied in step203. Switch 102 is maintained to be in a closed position in step 204 anddevice 100 keeps monitoring whether the second condition is satisfied.If it is determined that the second condition is not satisfied, switch102 is opened after a predefined time period in step 205, and hencedevice 100 is shut down. The predefined time period can be set by a userand/or administrator while configuring device 100. Device 100 can beconfigured by a user and/or administrator by entering configurationslocally or remotely through a web interface, an application programminginterface (API), a command line interface, or a console. Theconfigurations may be stored in a storage medium of device 100.

In one variant, when a power supply is connected to a device, the devicemay not receive power from the power supply and may be receiving powerfrom another power supply.

According to one of the embodiments of the present invention, the firstcondition may be based on one or more factors, such as position of a DIPswitch, a software configuration, or any other configuration which canbe used by a user and/or administrator for maintaining switch 102 in aclosed position. A user and/or administrator may configure the one ormore factors that the first condition may be based on.

In one example, device 100 comprises an external switch, such as a DIPswitch, that can be controlled by a user and/or administrator of device100. In step 201, the first condition is satisfied if the DIP switch isin an on state, and is not satisfied if the DIP switch is in an offstate. Therefore, switch 102 is maintained to be in a closed position instep 202 if the DIP switch is in the on state. The DIP switch can beused by a user and/or administrator of device 100 to manually controlswitch 102. For example, if switch 102 needs to be opened or closedimmediately, the user and/or administrator may choose to manuallycontrol switch 102 with the DIP switch instead of configuring device 100or controlling second power supply 105. Controlling switch 102 manuallymay take less time than configuring device 100 in case of an emergency.When the predefined time period is set to a specific value, such asinfinity or zero, but the user and/or administrator wants device 100 tostop receiving power from first power supply 104, the DIP switch can beused to open switch 102. Alternatively, when the predefined time is notset to zero or infinity, and switch 102 opens after a predefined time,the DIP switch can be used to close switch 102 so that device 100 startsreceiving power from first power supply 104.

In another example, in step 201, device 100 determines whether the firstcondition is satisfied or not according to a configuration that a userand/or administrator has configured device 100 with. If theconfiguration is to always maintain switch 102 to be in a closedposition regardless of the second condition, then the first condition issatisfied. If the configuration is to open switch 102 if the secondcondition is not satisfied, then the first condition is not satisfied.The configuration may be in the form of a value in a register or may bestored in a memory, such that when the value of the register is a firstvalue, switch 102 is always maintained to be in a closed position.Alternatively, when the value of the register is a value other than thefirst value, switch 102 is opened after a predefined time period in step205 if the second condition is not satisfied in step 203. Theconfiguration may also be in the form of a configuration file stored ina storage medium of device 100, and can be used by the processing unitto execute instructions according to the configuration file.

In some scenarios, such as in an industrial setting, it may be preferredto always keep switch 102 closed. This is because in the industrialsetting, first power supply 104 is likely to be from mains electricity.Since first power supply 104 is not from a battery, switch 102 does notneed to be opened, as there is no possibility of draining too much powerfrom the battery. When the user and/or administrator prefers switch 102to be in a closed position regardless of the second condition, the userand/or administrator may keep the DIP switch in an on state, orconfigure device 100 with a configuration to keep switch 102 in a closedposition.

In one variant, after step 202, device 100 keeps monitoring periodicallywhether the first condition is still satisfied. For example, if thefirst condition is based on the position of a DIP switch, device 100 maymonitor the position of the DIP switch periodically. While switch 102 isin a closed position in step 202, if the DIP switch is switched off andbecomes in an off state after step 202, device 100 determines that thefirst condition is no longer satisfied and therefore step 203 isconducted.

According to one of the embodiments of the present invention, the secondcondition may be based on whether or not power is being received fromsecond power supply 105. Alternatively, the second condition may bebased on whether an ACC line is in an on state or an off state. Detailsregarding the second condition are discussed below. 10

In one example, the second condition is satisfied if device 100 is stillconnected to second power supply 105. If device 100 determines in step203 that second power supply 105 is disconnected from device 100 ordevice 100 cannot receive power via second power supply 105, switch 102is opened after a predefined time period specified by the timer. Ifdevice 100 determines in step 203 that second power supply 105 is stillconnected or can still receive power via second power supply 105, switch102 is maintained to be in a closed position. It may be known to thoseskilled to those skilled in the art that in some scenarios, whenignition is off, power may not be received through the cigarette lighterreceptacle. Therefore, when device 100 is unable to receive power viasecond power supply 105, it is determined that the ignition is off, atimer starts running and hence switch 102 is opened after a predefinedtime period of the timer. The timer may be reset when device 100 shutsdown or is switched off.

As shown in FIG. 6, a timer may be a module in processing unit 607 ofdevice 100. The timer module is preferably a software module. However,the timer module may also be a hardware module.

There are various reasons why using a timer may be beneficial. In step205, processing unit 607 waits for a predefined time period beforeopening switch 102 so that the user and/or administrator of device 100may take necessary steps before device 100 is shut down. Device 100 maysend a notification to the user and/or administrator when the timerstarts. The notification is sent in order to inform the user and/oradministrator that the timer has started, and processing unit 607 mayopen switch 102 after the predefined time period. The notification mayalso be sent to request for a confirmation, which is explained ingreater detail in FIG. 3. The notification may be sent via an email, aninstant message, a short message service (SMS) message, a phone call, amessage shown in a web page, a popup message at a web page, or otherindicators that can be used to send the notification to the user and/oradministrator.

In one variant, the second condition is not satisfied if device 100 hasnot been able to receive power via power connector 107 for at least asecond predefined time period. The second predefined time period may bein the range of a few seconds to one minute. For example the predefinedtime period is five seconds. If, in step 203, device 100 determines thatsecond power supply 105 has remained disconnected for more than fiveseconds, then device 100 opens switch 102 after a predefined time periodin step 205. Alternatively, if device 100 determines that second powersupply 105 was disconnected for less than five seconds and has beenreconnected within five seconds, the second condition is still satisfiedand device 100 maintains switch 102 in the closed position in step 204.It is possible that there may be occasional interruptions in secondpower supply 105, and it may not be desirable that device 100 changesthe position of switch 102 every time there is an interruption in secondpower supply 105. Therefore, 11 if second power supply 105 has beendisconnected for more than five seconds, it is an indication that thisis not an interruption and that second power supply 105 has actuallybeen disconnected.

For illustration purposes, when device 100 is connected to the mainbattery and the cigarette lighter receptacle, in step 203, device 100determines whether the ignition is on or off by checking if it canreceive power via the cigarette lighter receptacle. If the ignition ison, device 100 continues drawing power from the main battery orcigarette lighter receptacle by maintaining switch 102 in the closedposition in step 204. If the ignition is turned off, device 100determines to open switch 102 after a predefined time period in step205. Therefore device 100 shuts down safely and opens switch 102 so thatit stops drawing power from the main battery. One of the benefits ofdevice 100 automatically shutting down when the ignition is off is thatdraining of the main battery is avoided.

However, in some scenarios, it is possible that a cigarette lighterreceptacle continues supplying power even when ignition is off. In suchcases, device 100 may require other information in order to detectwhether ignition is on or off. For example, device 100 may comprise anexternal DIP switch which the user and/or administrator can turn on oroff when ignition is on or off respectively. Alternatively, wiring ofthe car may be done such that when ignition is turned on with a key, asignal may be sent to device 100 directly.

In some scenarios, when ignition is off, the cigarette lighterreceptacle may still be able to supply power with significantly lowvoltage. Therefore in step 203, the second condition is not satisfiedwhen there is a significant drop in the voltage through the cigarettelighter receptacle and device 100 determines that the ignition is off.

Alternatively, device 100 is connected directly to an ACC line, which isin an on state when ignition is on, and is in an off state when ignitionis off. In step 203, device 100 determines whether the ignition is on oroff by checking the ACC line. The second condition is satisfied if theACC is in an on state. Using the ACC line to determine whether ignitionis on or off is beneficial when device 100 is used in car where thecigarette lighter receptacle can supply power even when the ignition isoff.

In one of the embodiments of the present invention, when device 100detects that the second condition is not satisfied in step 203, thetimer is started. After the timer is started and before opening switch102, device 100 may perform various functions of a shut-down processduring the predefined time period. The various functions may includesafely terminating any ongoing processes and/or gracefully shut-downdevice 100. For example, before device 100 is shut down, it may savedata in its storage medium or in a remote storage medium and thenterminate the ongoing processes. In another example, if device 100 isconnected to remote device(s) through wired or 12 wireless networks, itinforms the remote device(s) that it is going to be turned off after thepredefined time period ends.

According to one of the embodiments of the present invention, step 201and 202 may be omitted, as illustrated in FIG. 2B. In FIG. 2B, if thesecond condition is satisfied in step 203, switch 102 is maintained in aclosed position. If the second condition is not satisfied in step 2013,a timer starts running for a predefined time period, and switch 102 isopened after the predefined time period. However, if the predefined timeperiod is set to a very high value, it is likely that switch 102 ismaintained in a closed position even when the second condition is notsatisfied. Therefore, if the user and/or administrator prefers switch102 to be maintained in a closed position, i.e. a preferred position ofswitch 102 is the closed position, then the predefined time period ofthe timer may be set to a very high value. Alternatively, the userand/or administrator may also set the predefined time period of thetimer to zero if the preferred position of switch 102 is the closedposition. Therefore, even when the second condition is satisfied in step203, the timer does not start, and switch 102 remains in the closedposition.

FIG. 3 is a flowchart illustrating a process according to one of theembodiments of the present invention. FIG. 3 is viewed in conjunctionwith FIG. 2A for better understanding. Device 100 sends a message to auser and/or administrator after step 201 or after step 203. If the firstcondition is satisfied in step 201, device 100 sends a message at step301 for informing the user and/or administrator that device 100 iswaiting for a confirmation in order to maintain switch 102 in a closedposition. If a confirmation is received in step 302 from the user and/oradministrator to maintain switch 102 in the closed position, then device100 maintains switch 102 in a closed position in step 202. Thereforedevice 100 continues drawing power from first power supply 104. If theuser and/or administrator instead sends a message to open switch 102after a predefined time period, then switch 102 is opened after thepredefined time period in step 205.

Alternatively, if the first condition is not satisfied in step 201, andthe second condition is not satisfied in step 203, device 100 sends amessage at step 301 for informing the user and/or administrator thatdevice 100 has determined to open switch 102 after a predefined timeperiod. If a confirmation is received in step 302 from the user and/oradministrator to open switch 102 after the predefined time period, thendevice 100 opens switch 102 after the predefined time period in step205. If the user and/or administrator instead sends a message tomaintain switch 102 in a closed position, then device 100 maintainsswitch 102 in the closed position.

In one of the embodiments, the user and/or administrator confirmsopening switch 102 after a predefined time period in step 302, and alsospecifies the predefined time period. For example, the predefined timeperiod stored in device 100 is initially twenty 13 minutes. In step 301,device 100 sends a message to the user and/or administrator to confirmwhether switch 102 should be opened after twenty minutes in step 205. Inresponse to the message, the user and/or administrator sends anothermessage to device 100 confirming that switch 102 should be opened afterthirty minutes, and not twenty minutes. In this way the user and/oradministrator can change the predefined time period. Device 100 thenopens switch 102 after thirty minutes in step 205.

In one of the embodiments, step 302 is omitted. If the first conditionis satisfied in step 201, device 100 sends a message in step 301informing the user and/or administrator that switch 102 will bemaintained in the closed position. Device then continues to step 202 andmaintains switch 102 in a closed position without waiting for aconfirmation from the user and/or administrator. Alternatively, when thefirst condition and second condition is not satisfied, device 100 sendsa message in step 301 informing the user and/or administrator thatswitch 102 will be opened after a predefined time period. Device 100then continues to step 205 and opens switch 102 after the predefinedtime period without waiting for the confirmation from the user and/oradministrator. This is done so that the user and/or administrator isaware of the operations of device 100.

FIG. 4 illustrates a process carried out by a user and/or administratorof device 100 one of the embodiments of the present invention. Forexample, the user may prefer device 100 to always receive power fromfirst power supply 104, even when second power supply 105 is connected.The user may then connect device 100 to first power supply 104 throughterminal block 106 in step 400. If the user determines that device 100is receiving power from first power supply 104 in step 401, the userallows device 100 to continue receiving power from first power supply104 in step 405. Alternatively if the user determines that device 100cannot receive power from first power supply 104 in step 401, the userconnects second power supply 105 in step 402. The user then configuresdevice 100 such that switch 102 is closed regardless of whether secondpower supply 105 is connected or not. When switch 102 is closed, device100 can receive power from first power supply 104. The user disconnectssecond power supply 105 from device 100 is step 404 and device 100continues receiving power from first power supply 104. Step 404 isoptional, and second power supply 105 may remain connected to device100.

When both first power supply 104 and second power supply 105 areconnected to device 100, second power supply 105 can supply power todevice 100 when power from first power supply 104 is interrupted, andtherefore second power supply 105 can act as a backup power supply.

In one variant, depending on the voltage levels of first power supply104 and second power supply 105, the power supply with the highervoltage may supply power to 14 device 100.

FIG. 5 illustrates a process of configuring device 100 when there is achange of environment according to one of the embodiments. FIG. 5 isviewed in conjunction with FIG. 1A and FIG. 1B for better understandingof the embodiment. For illustration purpose, device 100 is moved from anindustrial setting to a car setting. In an industrial setting, it ispreferred to use a power supply with high voltage. Therefore, whendevice 100 is being used in an industrial setting, it is configured touse first power supply 104 regardless of whether second power supply 105is connected or not. Alternatively, when device 100 is used in a car,device 100 is configured to open switch 102 when the ignition is off andmaintain switch 102 in the closed position when ignition is on. Whenignition is off, a cigarette lighter receptacle may not supply power orthe ACC may be in the off state.

The process starts at step 500 where a user may connect device 100 tofirst power supply 104 through terminal block 106 and to second powersupply 105 through power connector 107. In step 501, device 100determines whether switch 102 is in a closed position. If switch 102 isnot in a closed position and a second condition is satisfied in step502, switch 102 is closed and is maintained in the closed position instep 503. The second condition is satisfied if second power supply 105is connected or the ACC is in an on state. Device 100 continuesmonitoring whether the second condition is satisfied in step 502 afterswitch 102 is closed in step 503. If device 100 detects that the secondcondition is not satisfied in step 502, switch 102 is opened after apredefined time period in step 504.

When device 100 is being used in a car, it should be configured suchthat switch 102 is maintained in a closed position only when the secondcondition is satisfied, i.e. the ignition of the car is on. When theignition of the car is off, switch 102 should be opened after apredefined time period so that the main battery of the car is notdrained.

If device 100 determines that switch 102 is closed in step 501, and thesecond condition is satisfied in step 505, switch 102 is maintained inthe closed position in step 503. If device 100 detects that the secondcondition is not satisfied in step 502, switch 102 is opened after apredefined time period in step 504.

If device 100 determines that the second condition is not satisfied instep 505, it determines whether device 100 is being used in a car instep 506. If device 100 is not being used in a car, switch 102 ismaintained in the closed position in step 510.

If device 100 is being used in a car, processing unit 607 of device 100determines a configuration corresponding to operating in a car in step507. Device 100 sends a request to a user and/or administrator in step508 for reconfiguring device 100 because its environment has changedfrom an industrial setting to a car. The request can be sent via anemail, an instant message, a SMS, a phone call, a message shown in a webpage, 15 a popup message at a web page, or other indicators that can beused to send the request to the user and/or administrator.

In one example, in step 508, device 100 sends a request for configuringdevice 100 manually and informing the user and/or administrator that theenvironment of device 100 has changed. The user and/or administrator canthen reconfigure device 100 in step 509 according to the request.

In another example, a configuration corresponding to operating in a caris stored in device 100. Therefore, in step 508, device 100 sends arequest informing the user and/or administrator that device 100 hasdetermined the configuration corresponding to operating in a car, andfor receiving a confirmation from the user and/or administrator. Afterreceiving confirmation from the user and/or administrator, device 100then reconfigures itself in step 509 with the configurationcorresponding to operating in a car. In one variant, device 100reconfigures itself without waiting for a confirmation from the userand/or administrator.

In one variant, step 508 is omitted and device 100 reconfigures itselfin step 509 after determining the configuration corresponding tooperating in a car in step 507.

After reconfiguring in step 509, device 100 monitors whether the secondcondition is satisfied in step 502. Hence, switch 102 is maintained inthe closed position in step 503 if the second condition is satisfied,and is opened after a predefined time period in step 504 if the secondcondition is not satisfied.

Step 506 may be performed in various ways. In one variant, processingunit 607 determines whether device 100 is being used in a car bychecking whether device 100 is connected to an ACC line through input111. If device 100 is not connected to an ACC line, processing unit 607determines that device 100 is not being used in a car and the switch ismaintained in the closed position in step 510. If device 100 isconnected to an ACC line, processing unit determines that device 100 isbeing used in a car. In another variant, device 100 may have one or morebuttons or DIP switches which can be used by a user and/or administratorto allow processing unit 607 to determine that device 100 is being usedin a car.

In one of the embodiments of the present invention, device 100 is anetwork device, such as a router. Device 100 can be used to connect tonetworks through wired or wireless connections. For example, device 100establishes one or more Virtual Private Network (VPN) connections with aremote node. The one or more VPN connections can be aggregated to forman aggregated VPN connection. Device 100 may use its credentials forauthentication and security purposes when establishing the one or moreVPN connections. When the timer has started running, device 100 sendsout notifications to the remote devices and/or to hosts that connect toother networks through device 100 to notify them that device 100 isgoing to shut down within a predefined 16 time period. This isbeneficial in scenarios where there are one or more ongoing datasessions which should be terminated safely and one or more nodes orhosts belonging to the one or more data sessions are aware that device100 is going to shut down. A notification can be displayed on a userinterface of a host that connects to a VPN through device 100 that theVPN connection is about to be disconnected since device 100 will be shutdown.

In other examples, when device 100 is a router used for connecting to anetwork for applications such as video conferencing, filling an onlineapplication form, VoIP calls, and many other applications, it isbeneficial to receive a warning that the session will be terminated.Therefore, for this purpose, device 100 sends messages to hosts or nodesduring the predefined time period.

Device 100 can be used in different environments and can be configureddifferently according to the environments.

As discussed above, when device 100 is being used in a car, it ispreferably configured to receive power via terminal block 106 from firstpower supply 104 while the engine of the car is on, and opening switch102 after a predefined time period if the engine of the car is off sothat the device 100 no longer draws power from first power supply 104.This is beneficial because it is desirable that the main battery of thecar is not drained completely while the engine is off.

Alternatively, when device 100 is being used in an industrial setting,it is preferably configured to receive power via terminal block 106 fromfirst power supply 104 regardless of whether second power supply 105 isconnected or the status of input 111. In an industrial setting, it islikely that a power supply with high voltage would be available to actas first power supply 104.

In one of the embodiments, when device 100 is being used in anindustrial setting, the first power supply is a battery and the secondpower supply is the mains electricity. Device 100 preferably uses powerfrom the second power supply whenever available. When the second powersupply is disconnected for reasons such as a power outage, device 100starts using power from the first power supply. Device 100 also startsthe timer so that switch 102 is opened after the predefined time period.Therefore, after the predefined time period, device 100 shuts down andstops drawing power from the first power supply. In one variant, device100 preferably receives power from the battery, which is the first powersupply via terminal block 106. Terminal block 106 may be able to handlehigher voltages, and hence device 100 receives high voltage powerthrough terminal block 106. The battery may be charged from the mainselectricity. When there is a power outage, device 100 determines to openswitch 102 after a predefined time period.

Alternatively, when device 100 is being used in a home setting, it islikely that a 17 power supply with high voltage would not be availablefor connecting to device 100 through terminal block 106. Therefore, whendevice 100 is being used in a home setting, it receives power via powerconnector 107 from second power supply 105. Second power supply 105 maybe the mains electricity which may supply power to device 100 using a DCpower adapter, an AC power adapter, a Universal Serial Bus (USB), orthrough any other medium through which power can be supplied to device100.

It should be noted that, in all of the above scenarios, device 100 hasdual power supply capabilities. There is no restriction that the numberof power supplies is two. More than two power supplies may be used fordevice 100. Device 100 is capable of receiving power from either one ofthe power supplies. When one of the power supplies is abruptlydisconnected, or there is an interruption in power being received fromone of the power supplies, device 100 can start receiving power from theother power supply, such that the ongoing processes in device 100 arenot interrupted due to interruption in the power supply.

When car engine is turned on, switch 102 may either be open or closeinitially. According to the embodiments described above, when ignitionof a car is turned off, switch 102 may be opened such that device 100stops receiving power from first power supply 104. When ignition of thecar is again turned on, processing unit 607 may detect that the car ison by receiving a signal due to power received through second powersupply 105. Processing unit 607 may then send a signal to close switch603 so that device 100 may start receiving power from first power supply104.

According to one of the embodiments, when switch 102 opens due to theignition being turned off, switch 102 may again be closed if first powersupply 104 is disconnected from power connector 107. Power is notdrained from first power supply 104 even when the switch is closed,since first power supply 104 is disconnected. In this way, the next timeignition is turned on, switch 102 is already closed. If first powersupply 104 is connected to device 100 again at a time when ignition isnot on, processing unit 607 may check whether ignition is on andaccordingly open switch 102 as described in the above embodiments.

FIG. 7A is an illustrative schematic of a circuit used by processingunit 607 of device 100 for detecting whether power is being receivedthrough second power supply 105 according to one of the embodiments ofthe present invention. DC_IN 701 is connected to power connector 107.Power from second power supply 105 may be received at DC_IN 701.Resistors R1 and R3 form a voltage divider. Resistors R7 and R8 formanother voltage divider. Comparator 704 compares voltage at point 702(VA) and voltage at point 703 (VB). LP211 from Texas InstrumentsIncorporated is used as comparator 704 in a preferred embodiment.However, there is no limitation that LP211 18 must be used. For example,when the operating voltage of device 100 is 3.3V, 3.3V may be used as areference voltage, and DC_IN 701 is compared against the referencevoltage. The emitter output (EO Pin 1) of comparator 704 is connected toground. The ratio of R1 to R3 and the ratio of R7 to R8 may or may notbe same. Voltage at DC_IN 701 may be in the range of 6V-24V. Therefore,even when R7:R8 is higher than R1:R3, VA may be higher than VB. Forexample, when voltage at DC_IN 701 is approximately 6V, the ratio R7:R8should be less than double of R1:R3, so that VA may be compared to VB.When VA is higher than VB, collector output (CO Pin 7) becomes highimpedance. CO Pin 7 is an open collector, such that the output can bedisconnected (high impedance) or low (ground). When CO Pin 7 output ishigh impedance, resistor R4 pulls up the voltage to 3.3V in order togenerate a logical signal 1 at DC_IN_IO 706. Alternatively, when VA islower than VB, output at CO Pin 7 is low, and a logical signal 0 isgenerated at DC_IN_IO 706. DC_IN_IO 706 is an input to processing unit607 of device 100. For example, when power is being received from secondpower supply 105, VA is likely to be higher than VB, and hence DC_IN_IO706 is 1. Thus processing unit 607 receives a logical signal of 1through DC_IN_IO 706 and determines that power is being received throughsecond power supply 105.

FIG. 7B is an illustrative schematic of a circuit used by processingunit of device 100 for controlling power received from first powersupply 104 according to one of the embodiments of the present invention.First power supply 104 is connected to Terminal_Block_IN 710 throughterminal block 106. A voltage divider, which comprises resistors R9 andR10, outputs a voltage at point 712, which is lower than the voltage ofpower received through first power supply 104. For readability, theoutput voltage is referred to be VDD_Terminal 711. Latch 718 iscontrolled by processing unit 607 of device 100 through data input (D)pin 3 and latch enable input (LE) pin 1. NC7SZ373 from FairchildSemiconductor Corporation is used as latch 718 in a preferredembodiment. However, there is no limitation that NC7SZ373 must be used.Voltage at VDD_Terminal 711 is an input to VCC Pin 5 of latch 718. Asthe voltage at Terminal_Block_IN 710 may exceed the maximum voltage thatlatch 718 can handle, VDD_Terminal 711 is used instead of connectingdirectly to Terminal_Block_IN 710. Capacitor C1 717 is used as adecoupling capacitor in order to reduce the noise at VCC pin 5.TerminalBlock_IN_CTRL 713 and TerminalBlock_IN_LATCH_EN 714 are inputsfrom processing unit 607 to D pin 3 and LE pin 1 respectively. VDD25 715is from processing unit 607, and voltage at VDD25 715 is about 2.5V.Resistors R12 and R13 are used to pull up the voltage atTerminalBlock_IN_CTRL 713 and TerminalBlock_IN_LATCH_EN 714respectively. Voltage at VDD_terminal 711 may be higher than voltage atVDD25 715. For illustration purpose, processing unit 607 may maintainthe input at LE pin 1 at high logic level and may change the input at Dpin 3 in order to control the output at latch output (Q) pin 4 of latch718. When input at LE pin 1 is high, and input at D pin 3 is high,output at Q pin 4 is high impedance. Q pin 4 is then an open drainconnection, and thus VDD_terminal 711 is connected to Q pin 4 throughR14 in order to pull up the voltage to about the voltage at VDD_Terminal711, which is about the same as VDD_terminal 711. As output enable input(OE) pin 6 is not used, it may be connected to ground through resistorR16. Resistor R17 may be used for reducing current at gate of NFET 720.When Q pin 4 is high, gate voltage (VG) is approximately equal tovoltage at VDD_Terminal 711. Therefore, when Q pin 4 is high, NFET 720is conducting, such that source voltage (VS) and drain voltage (VD) ofNFET 720 is about the same. Resistor R15 is used for reducing thecurrent flow towards ground from Terminal_Block_IN 710. Resistor R11 isused for pulling up voltage of PFET 721 to the voltage atTerminal_Block_IN 710 when PFET 721 is conducting. Consequently, whenNFET 720 is conducting, the voltage at pin 3 of PFET 721 is higher thanthe voltage at pin 4 of PFET 721, and hence PFET 721 becomes conducting.When PFET 721 is conducting, and input at Pin 3 of PFET 721 is connectedto first power supply 104 through Terminal_Block_IN 710, output at Pin 5of PFET 721 becomes approximately equal to the voltage atTerminal_Block_IN 710. Diode D1 723 is used to ensure that currentdirection is only toward VIN 724, and prevent current from flowingtowards PFET 721 in case of a voltage drop. VIN 724 is connected to load103 of device 100. Therefore, when processing unit 607 sends a highinput signal through TerminalBlock_IN_CTRL to D pin 3 and throughTerminalBlock_IN_LATCH_EN to LE pin 1, NFET 720 and PFET 721 areconducting, and load 103 is supplied with power from first power supply104 through VIN 724. Alternatively, when processing unit sends a lowinput signal through TerminalBlock_IN_CTRL to D pin 3, and maintainsinput signal through TerminalBlock_IN_LATCH_EN to LE pin 1 at high,output at Q pin 4 is low. When output at Q pin 4 is low, NFET 720 is notconducting, and hence PFET 721 is also not capable of conducting.Therefore, load 103 is not supplied with power from first power supply104 through VIN 724. A voltage divider may be connected between VIN 724and load 103 in order to reduce the voltage at load 103 to 3.3V.

In one example, for illustration purpose, device 100 is being used in acar. As discussed in FIG. 2A, when device 100 is used in a car, it ispreferred that device 100 is turned off when the ignition of the car isturned off in order to avoid draining power from main battery of thecar. When ignition of the car is turned off, voltage at DC_IN 701 maybecome zero or very low, as DC_IN 701 is connected to cigarette lighterreceptacle or ACC line of the car. Therefore, VA is determined to belower than VB, and output at CO pin 7 is low. DC_IN_IO 706 is at aboutzero volt, and a logical signal of 0 is input to processing unit 607. Asa result, processing unit 607 may turn off device 100 after a predefinedtime period specified in a timer or in a setting. When the predefinedtime period is over, processing unit 607 may send a logical signal 0 tolatch 718 through TerminalBlock_IN_CTRL 713 at D pin 3 of latch 718.When input at D pin 3 is low, output at Q pin 4 of latch 718 becomeslow, and hence NFET 720 stops conducting. When NFET 720 stopsconducting, PFET 721 also stops conducting, and device 100 isconsequently turned off, as load 103 stops receiving power through VIN724. When device 100 is turned off, input at LE pin 1 also becomes low,and output at Q pin 4 is maintained at low.

In another example, device 100 may shut down suddenly while ignition ofthe car is still on. In this case, load 103 stops receiving powerthrough VIN 724. However, latch 718 may continue its operation, as itmay still receive power from main battery of the car at VDD_terminal711. Power consumed by latch 718 is not too high. If device 100 isturned on again at a time when car ignition is off, there is apossibility that load 103 again starts drawing power from the mainbattery, and the main battery may then be drained. When device 100 is onwhile car ignition is off, VA is determined to be lower than VB, andthus processing unit 607 sends a logical signal 0 throughTerminalBlock_IN_CTRL 713 such that PFET 721 stops conducting and load103 stops drawing power from the main battery through Terminal_Block_IN710. Hence device 100 is shut down again. If car ignition is on and VAis determined to be higher than VB, then processing unit 607 may send alogical signal 1 to D pin 3 and hence PFET 721 starts conducting andload 103 is capable of receiving power from the main battery.

The embodiments were chosen and described in order to best explain theprinciples of the invention and its practical applications, to therebyenable others skilled in the art to best utilize the invention andvarious embodiments with various modifications as are suited to theparticular use contemplated.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1A is an illustrative block diagram of a device according to one ofthe embodiments of the present invention.

FIG. 1B is an illustrative block diagram of a device according to one ofthe embodiments of the present invention.

FIG. 2A is a flowchart illustrating a process for managing power supplyat a device according to one of the embodiments of the presentinvention.

FIG. 2B is a flowchart illustrating a process for managing power supplyat a device according to one of the embodiments of the presentinvention.

FIG. 3 is a flowchart illustrating a process for managing power supplyat a device according to one of the embodiments of the presentinvention.

FIG. 4 is a flowchart illustrating a process performed by a user and/oradministrator for managing power supply at a device according to one ofthe embodiments of the present invention.

FIG. 5 is a flowchart illustrating a process for managing power supplyat a device according to one of the embodiments of the presentinvention.

FIG. 6 is an illustrative block diagram of a power management circuitaccording to one of the embodiments of the present invention.

FIG. 7A is an illustrative schematic of a circuit used by processingunit 607 of device 100 for detecting whether power is being receivedthrough second power supply 105 according to one of the embodiments ofthe present invention.

FIG. 7B is an illustrative schematic of a circuit used by processingunit of device 100 for controlling power received from first powersupply 104 according to one of the embodiments of the present invention.

The invention claimed is:
 1. A method for managing power supply througha first switch at a device, wherein the device is configured to receivepower via a plurality of power inputs for a load of the device and isoriginally receiving power from a second power supply, the methodcomprising: (a) determining whether a first condition is satisfied;wherein the first condition is based on at least one factor; (b) whenthe first condition is satisfied, maintaining the first switch in aclosed position to receive power from a first power supply for the load;(c) when the first condition is not satisfied, determining whether asecond condition is satisfied; (d) maintaining the first switch in theclosed position for receiving power from the first power supply for theload if the second condition is satisfied; (e) if the second conditionis not satisfied, opening the first switch after a predefined timeperiod for not further receiving power from the first power supply andnot further receiving power from the second power supply; wherein thefirst condition and the second condition are based on at least twodifferent factors; wherein the first power supply is configured tosupply more power than the second power supply; wherein the powersupplied by the first power supply and the second power supply are forthe load; wherein the at least two different factors are configured byat least one of a user and an administrator of the device; wherein thefirst switch is comprised of a latch and two field-effect transistors;and wherein the latch is controlled by a processing unit of the device.2. The method of claim 1, further comprising performing a shutdownprocess before opening the first switch, wherein the shut-down processincludes at least one of, safely terminating any ongoing processes andcontrollably shutting down the device.
 3. The method of claim 1, whereinthe second condition is satisfied if the device is receiving power froma second power supply and wherein the second condition is not satisfiedif the device is not receiving power from a second power supply.
 4. Themethod of claim 1, wherein the device is connected to the first powersupply through a terminal block of the device, wherein the terminalblock is mounted on the device.
 5. The method of claim 3, wherein thedevice is connected to the second power supply through a power connectorof the device, wherein the power connector is selected from a groupconsisting of: a Universal Serial Bus (USB) input port, a Direct Current(DC) input port, and an Alternating Current (AC) input port.
 6. Themethod of claim 1, further comprising: sending a first message to atleast one of the user and administrator of the device when the devicestops receiving power from the second power supply, wherein the firstmessage is to be received by a remote device; opening the first switchafter a predefined time period if a confirmation is received from the atleast one of the user and administrator; and maintaining the firstswitch in a closed position if a confirmation is not received from theat least one of the user and administrator.
 7. The method of claim 1,wherein the predefined time period is set by the at least one of, userand administrator of the device locally through a console or remotelythrough one of, a web interface, an application programming interface(API), or a command line interface.
 8. The method of claim 1, whereinwhen the device is placed in an automobile, the first switch is closedwhen an ignition is on, and the first switch is opened after apredefined time period when the ignition is off, wherein the devicedetermines that it is placed in an automobile if an accessory (ACC) lineis connected through a first input of the device.
 9. The method of claim8, wherein the second power supply is a cigarette lighter receptacle,and the first power supply is a main battery of the automobile.
 10. Themethod of claim 8, wherein the second condition is satisfied if the ACCline of the automobile is in an on state.
 11. A system for managingpower supply through a first switch at a device, wherein the device isconfigured to receive power via a plurality of power inputs for a loadof the device and is initially receiving power from a second powersupply, wherein the system comprises: a first power supply; a secondpower supply; at least one processing unit; at least one storage mediumstoring program instructions executable by the at least one processingunit for: (a) determining whether a first condition is satisfied;wherein the first condition is based on at least one factor; (b) whenthe first condition is satisfied, maintaining the first switch in aclosed position for receiving power from a first power supply for theload; (c) when the first condition is not satisfied, determining whethera second condition is satisfied; (d) maintaining the first switch in theclosed position for receiving power from the first power supply for theload if the second condition is satisfied; (e) if the second conditionis not satisfied, opening the first switch after a predefined timeperiod for not further receiving power from the first power supply andnot further receiving power from a second power supply; wherein thefirst condition and the second condition are based on at least twodifferent factors; wherein the first power supply is configured tosupply more power than the second power supply; wherein the powersupplied by the first power supply and the second power supply are forthe load; wherein the at least two different factors are configured byat least one of a user and an administrator of the device; wherein thefirst switch is comprised of a latch and two field-effect transistors;and wherein the latch is controlled by the at least one processing unitof the device.
 12. The system of claim 11, wherein the at least onestorage medium stores program instructions for performing a shut-downprocess before opening the first switch, wherein the shut-down processincludes at least one of, safely terminating any ongoing processes andcontrollably shutting down the device.
 13. The system of claim 11,wherein the second condition is satisfied if the device is receivingpower from a second power supply and wherein the second condition is notsatisfied if the device is not receiving power from a second powersupply.
 14. The system of claim 11, wherein the device is connected tothe first power supply through a terminal block of the device, whereinthe terminal block is mounted on the device.
 15. The system of claim 11,wherein the device is connected to the second power supply through apower connector of the device, wherein the power connector is selectedfrom a group consisting of: a Universal Serial Bus (USB) input port, aDirect Current (DC) input port, and an Alternating Current (AC) inputport.
 16. The system of claim 11, wherein the at least one storagemedium is configured to store program instructions for: sending a firstmessage to at least one of the user and administrator of the firstdevice when the device stops receiving power from the second powersupply; wherein the first message is to be received by a remote device;opening the first switch after a predefined time period if aconfirmation is received from the at least one of the user andadministrator; maintaining the first switch in a closed position if aconfirmation is not received from the at least one of the user andadministrator.
 17. The system of claim 11, wherein the predefined timeperiod is set by the at least one of the user and administrator of thedevice locally through a console or remotely through one of, a webinterface, an application programming interface (API), or a command lineinterface.
 18. The system of claim 11, wherein when the device is placedin an automobile, the first switch is closed when an ignition is on, andthe first switch is opened after a predefined time period when theignition is off; wherein the device determines that it is placed in anautomobile if an accessory (ACC) line is connected through an input ofthe device.
 19. The system of claim 18, wherein the second power supplyis a cigarette lighter receptacle, and the first power supply is a mainbattery of the automobile.
 20. The system of claim 18, wherein thesecond condition is satisfied if an ACC line of the automobile is in anon state.